<template>
    <header class="head-top">
        <div class="flex-left" @click="$router.go(-1)" v-if="showBackBtn">
            <span class="back"></span>
        </div>
        <span class="flex-center" v-if="headTitle">{{ headTitle }}</span>
    </header>
</template>

<script>
    export default {
        props: {
            headTitle: {
                type: String,
                default: ''
            },
            showBackBtn: {
                type: Boolean,
                default: true
            }
        },
        data() {
            return {}
        },
        methods: {}
    }
</script>

<style lang="scss" scoped type="text/css">
    @import "@/assets/css/utils.scss";

    .head-top {
        display: flex;
        display: -webkit-flex;
        display: -moz-flex;
        -webkit-justify-content: center;
        -moz-justify-content: center;
        justify-content: center;
        -webkit-align-items: center;
        -moz-align-items: center;
        align-items: center;
        height: 88px;
        padding: 0 66px;
        background-color: #fff;
    }
    .flex-left {
        position: absolute;
        top:0;
        left: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 66px;
        height: 88px;
        .back {
            display: inline-block;
            width: 19px;
            height: 35px;
            @include bg-img('../assets/images/return_icon');
        }
    }
    .flex-center {
        font-size: 36px;
        color: #696969;
    }
</style>